package com.woniuedu.controller;

import com.woniuedu.entity.Comment;
import com.woniuedu.entity.ResponseEntity;
import com.woniuedu.service.ICommentService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/comment")
public class CommentController {

    @Autowired(required = false)
    private ICommentService commentService;

    @PostMapping("/addComments")
    @ApiOperation(value = "添加评论")
    public int addComments(@RequestBody Comment comment){
        return commentService.addComments(comment);
    }

}
